package indi.zhifa.engine.core.excel2025.entity.exception;

import indi.zhifa.engine.core.excel2025.enums.EExcelErrorCode;
import lombok.Data;

@Data
public class ExcelErrorInfo {
    Integer id;
    String sheetName;
    Integer row;
    Integer col;
    EExcelErrorCode errCode;
    String errorInfo;

    public ExcelErrorInfo(EExcelErrorCode pCode, String pErrorInfo) {
        errCode = pCode;
        errorInfo = pErrorInfo;
        row = -1;
        col = -1;

    }

    public ExcelErrorInfo(String pSheetName, Integer pRow, Integer pCol, EExcelErrorCode pCode, String pErrorInfo) {
        sheetName = pSheetName;
        row = pRow;
        col = pCol;
        errCode = pCode;
        errorInfo = pErrorInfo;
    }

    public ExcelErrorInfo(String pSheetName, Integer pRow, EExcelErrorCode pCode, String pErrorInfo) {
        sheetName = pSheetName;
        row = pRow;
        col = -1;
        errCode = pCode;
        errorInfo = pErrorInfo;
    }
}
